
function updateUsername(obj, id) {
	var username = $(obj).val();
	
	var param = {
		"id": id,
		"username": username
	}
	API.managementMigrateUpdate(param, function(res) {
		if (res.code == '0') {
			
		} else {
			alert(res.desc);
		}
	});
}

function updatType(obj, id) {
	var type = $(obj).val();
	
	var param = {
		"id": id,
		"type": type
	}
	API.managementMigrateUpdate(param, function(res) {
		if (res.code == '0') {
			
		} else {
			alert(res.desc);
		}
	});
}

function updateLocation(obj, id) {
	var location = $(obj).val();
	
	var param = {
		"id": id,
		"location": location
	}
	API.managementMigrateUpdate(param, function(res) {
		if (res.code == '0') {
			
		} else {
			alert(res.desc);
		}
	});
}

function excute(obj, code) {
	if(UTIL.checkButton(obj)) {

		API.managementMigrateExcute({ "code": code }, function(res) {
			if (res.code == '0') {
				alert("执行成功！");
			} else {
				alert(res.desc);
			}
		});
		
		UTIL.releaseButton(obj);
	}
}